<template>
<!-- 团队建设明细 -->
  <div class="team-detail">
    <div class="title">{{ info.workingTitle }}</div>
    <div class="tag tag-right">
      <van-icon name="manager-o" /> {{ info.loginId }}
      <van-icon name="clock-o" class="pd8" /> {{ info.inputTime }}
    </div>
    <div class="tag"><van-icon name="label-o" /> {{ info.workingMethod }}</div>
    <van-uploader v-model="info.workingPhoto" :deletable="false" :show-upload="false" preview-size="100px" />
    <div class="content">{{ info.workingContent }}</div>
  </div>
</template>

<script>
import { handBookInfo } from '@/api/publicline/team.js'

export default {
  components: { },
  data() {
    return {
      id: '',
      info: {}
    }
  },
  mounted() {
    this.id = this.$route.query.id
    this.getInfo()
  },
  methods: {
    async getInfo() {
      const params = { id: this.id }
      const res = await handBookInfo(params)
      const { result, success } = res
      if(success) {
        if(result.length != 0) {
          result.map(item => {
            item.workingPhoto = JSON.parse(item.workingPhoto)
          })
        }
        this.info = result[0] || {}
      }
    }
  }
}
</script>
<style lang="less" scoped>
.team-detail {
  background: #fff;
  padding: 12px;
  .pd8 {
    padding-left: 8px;
  }
  .title {
    font-size: 22px;
    text-align: center;
    margin: 12px 0;
    color: #455a64;
  }
  .tag {
    color: #888;
    font-size: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  .tag-right {
    justify-content: flex-end;
  }
  .van-icon {
    padding-right: 2px;
  }
  .van-uploader {
    margin: 8px 0;
  }
  .content {
    line-height: 24px;
    color: #455a64;
  }
}
</style>
